GetBlock(BlockName)

Retrieves a block. Use this method to call child blocks of the CRM object. For more information, see Blocks.

Parameters

BlockName. Specifies the name of the block, existing screen or list in Sage CRM to retrieve.

Examples

var Marquee;
Marquee = CRM.GetBlock("marquee");

Retrieves a new marquee block and stores it in the Marquee variable.

var Search;
var List;
var Container;
Search = CRM.GetBlock("CompanySearchBox");
List = CRM.GetBlock("CompanyGrid");
Container = CRM.GetBlock("Container");
Container.AddBlock(Search);
Container.AddBlock(List);
CRM.AddContent(Container.Execute());
Response.Write(CRM.GetPage());

Gets a Container, Search (CompanySearchBox), and List (CompanyGrid) block. Adds the search screen and list to the container and displays the container. You can configure the Execute method to use the search results as the argument for the list.